<template>
  <div>
      <Fanhui/>
      <div class="xxx">
          <van-contact-card type="add" @click="onAdd" />
      </div>
<van-contact-card
  type="edit"
  :name="currentContact.name"
  :tel="currentContact.tel"
  @click="onEdit"
/>
  </div>
</template>

<script>
import Fanhui  from  '@/views/Center/fanhui.vue'
import Vue from "vue";
import { ContactCard ,Toast} from "vant";

Vue.use(ContactCard);
Vue.use(Toast);
export default {
  data() {
    return {
      currentContact: {
        name: '张三',
        tel: '13000000000',
      },
    };
  },
  components: {
   Fanhui
  },
  methods: {
    onEdit() {
      Toast('编辑');
    },
      onAdd() {
      Toast('新增');
    },
  },
                     created() {
    this.$store.commit("setIsShow", false);
  },

  mounted() {},
  beforeDestroy() {
    this.$store.commit("setIsShow", true);
  },
};
</script>

<style>
.xxx{
    margin-top: 10px;
    margin-bottom: 20px;
}
</style>